package tests;

import java.io.File;
import java.io.IOException;

import org.apache.http.HttpHost;
import org.apache.http.client.ClientProtocolException;

import com.wsc.crawler.init.CrawlerConfig;
import com.wsc.crawler.postcrawling.PostURLs;

/*
 * Working fine
 */
public class PostURLsTest {

	/**
	 * @param args
	 */
    public static void main(String ...sv) throws ClientProtocolException, IOException{
    	
    	PostURLs v=new PostURLs();
    	CrawlerConfig conf=new CrawlerConfig();
    	conf.loadXmlFile(new File("sfs"));
    	HttpHost frontierHost=conf.getFrontierHost();
    	String xmlurls_to_post=
    			"<urllist>" +
    				"<urlentry>" +
    					"<url>http://www.google.com</url>" +
    					"<frompage>http://www.example.com/index.html</frompage>" +
    					"<host>http://www.google.com</host>	" +
    				"</urlentry>" +
    			"</urllist>";
    	
    	
        v.postXML(xmlurls_to_post, frontierHost);
    }
    
}
